A New Scheme for Unification in WAM

نویسندگان

  • André Mariën
  • Bart Demoen
چکیده

Prolog spends about 50% of its execution time in unification. It is therefore worthwhile to investigate improvements to unification. The propagation of read-write mode in WAM is a candidate for improvement. We present a new translation scheme to deal with it. The scheme has the following advantages: there is no code explosion; for right sided structures the usual form lists take in Prolog programs there is no overhead in the propagation of the read-write mode; for left sided structures, the overhead is made very small by rearranging the order in which the arguments of the structure are treated; it uses the optimal structure creation code in the write mode. The scheme is particularly good for native code compilers. It is also shown how the method can take into account particularities of the underlying hardware. Test results show good speedup, making mode declarations for efficiency reasons almost unnecessary. In addition, we include an important improvement to temporary register allocation schemes.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A WAM-Based Implementation of a Logical Language with Sets

the paper analyzes an approach for integrating set theoretical constructs into a logic programming language. The focus is on describing a new abstract machine, based on the classical WAM, designed to support these new features. A major part of the paper concentrates on the implementation of the new unification algorithm and the set-constraints management support.

متن کامل

A WAM-Based Implementation of a Logic Language with Sets

the paper analyzes an approach for integrating set theoretical constructs into a logic programming language. The focus is on describing a new abstract machine, based on the classical WAM, designed to support these new features. A major part of the paper concentrates on the implementation of the new unification algorithm and the set-constraints management support.

متن کامل

An Experiment in Abstract Machine Design

SUMMARY In this article we present Typed Feature Structures as an extension of Prolog, and show how to come up with a compilation scheme and an abstract machine using a design methodology based on partial evaluation. First we define the transformations used by our partial evaluator. Then we present the design methodology which we will use later. Next, we clarify the notion of Typed Feature Stru...

متن کامل

A Wam Implementation for Flexible Query Answering1

In [7] Maria I. Sessa extended the SLD resolution principle with the ability of performing approximate reasoning and flexible query answering. The operational mechanism of similarity-based SLD resolution can be used as the basis for a new logic language that allows to manage uncertain and imprecise information in a declarative framework, hence its importance. Similarity-based SLD resolution can...

متن کامل

Scoping Constructs in Logic Programming: Implementation Problems and their Solutions

The inclusion of universal quantification and a form of implication in goals in logic programming is considered. These additions provide a logical basis for scoping but they also raise new implementation problems. When universal and existential quantifiers are permitted to appear in mixed order in goals, the devices of logic variables and unification that are employed in solving existential goa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1991